package com.ttg.model.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ttg.common.entities.BasePage;
import com.ttg.model.dto.VipTagDto;
import com.ttg.model.dto.open.QueryVipGradeByCustomerDto;
import com.ttg.model.dto.open.QueryVipGradeByIdCardDto;
import com.ttg.model.dto.open.QueryVipTagByCustomerNoDto;
import com.ttg.model.dto.open.QueryVipTagByIdCardDto;
import com.ttg.model.pojo.BankPrivatePrimitive;
import com.ttg.model.vo.VipGetInfoListVo;
import com.ttg.model.pojo.VipInfo;
import com.ttg.model.vo.VipInfoGetListVo;
import com.ttg.model.vo.VipTagVo;
import com.ttg.model.vo.open.QueryVipGradeByCustomerNoVo;
import com.ttg.model.vo.open.QueryVipGradeByIdCardVo;
import com.ttg.model.vo.open.QueryVipTagInfoVo;
import com.ttg.model.vo.open.VipInfoVo;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;


/**
 * @author zhangHongYuan
 * @description
 * @date 2023/6/8 11:19
 */
public interface VipInfoMapper extends BaseMapper<VipInfo> {

    BasePage<VipInfoGetListVo> getVipInfoList(BasePage<VipInfoGetListVo> page,
                                          @Param("vipId") Long vipId,
                                          @Param("vipMobile") String vipMobile,
                                          @Param("name") String name,
                                          @Param("grade") Double grade,
                                          @Param("status") Integer status,
                                          @Param("startTime") LocalDate startTime,
                                          @Param("endTime") LocalDate endTime);

    QueryVipTagInfoVo queryVipTag(@Param("idCardNo") String idCardNo,@Param("type") Integer type);

    List<QueryVipGradeByIdCardVo> queryVipGradeByIdCard(@Param("dtos")List<QueryVipGradeByIdCardDto> dtos,@Param("typePrivate") Integer typePrivate);

    List<QueryVipTagInfoVo> queryVipTagByIdCard(@Param("idCardListDto")List<QueryVipTagByIdCardDto> idCardListDto,@Param("typePrivate") Integer typePrivate);
//
//    void updateGrowByTaskIdAndDate(@Param("taskId") Long taskId, @Param("nowDate") Integer nowDate, @Param("nowTime") LocalDateTime nowTime);
//
//    void LoadGrowBackUp();

    void sumTodayIntegral(@Param("excuteDate") Integer excuteDate);

    List<QueryVipGradeByCustomerNoVo> queryVipGradeByCustomerNo(@Param("dtos")List<QueryVipGradeByCustomerDto> customerNos,@Param("typePrivate") Integer typePrivate);

    List<QueryVipTagInfoVo> queryVipTagByCustomerNo(@Param("dtos")List<QueryVipTagByCustomerNoDto> customerNos,@Param("typePrivate") Integer typePrivate);

    void rattingGradeByBatch(@Param("idStart") Long idStart, @Param("idEnd") Long idEnd);

    boolean newVipRating();

    List<VipInfo> tblGxdAppCouponVip(@Param("size") Integer pageSize, @Param("startId") Long starId);


    BasePage<VipGetInfoListVo> getInfoList(BasePage<VipGetInfoListVo> page,
                                           @Param("vipId") Long vipId,
                                           @Param("vipMobile") String vipMobile,
                                           @Param("vipStatus") Integer vipStatus,
                                           @Param("vipIds") List<Long> vipIds);

    boolean updateVipStatus(@Param("vipId")Long vipId,
                            @Param("vipStatus")Integer vipStatus);

    VipTagVo getVipTag(@Param("vipId") Long vipId,
                      @Param("idCard") String idCard,
                      @Param("businessLicense") String businessLicense);

    VipInfoVo getSycnVip(@Param("vipId") Long vipId);
}
